//
//  NSString+TMNotNull.m
//  国学培训用户端
//
//  Created by Tao Li on 2018/8/18.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "NSString+TMNotNull.h"

@implementation NSString (TMNotNull)
+ (NSString *)isNotNull:(NSString *)str{
    if (str.length == 0 || [str isEqualToString:@""] || str == nil || str == NULL || [str isEqual:[NSNull null]] ||[str isKindOfClass:[NSNull class]] || [str isEqualToString:@"(null)"])
    {
        return @"";
    }else{
        return str;
    }
}
+(NSString *)stringWithBaseUrl:(NSString *)imageUrl{
    if ([imageUrl containsString:@"http"]) {
        return imageUrl;
    }
    return [NSString stringWithFormat:@"%@%@", TMAPI_HostName,imageUrl];
}
@end
